package com.cskaoyan.bean.lzp;

import com.cskaoyan.bean.Keyword;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * \* Description:
 * \* @author: Lizhanpeng
 * \* Date: 2022/5/6
 * \
 */
@Data
@NoArgsConstructor
public class KeywordData {
    private Integer total; //总的数据量，没有分页的情况下的数据量
    private Integer pages; //总的页码数
    private Integer limit; //当前页最多的数据量
    private Integer page; //当前页的页码
    private List<Keyword> list;

    public static KeywordData data(long total, Integer pages, Integer limit, Integer page, List list) {
        KeywordData keywordData = new KeywordData();
        keywordData.setTotal((int) total);
        keywordData.setPages(pages);
        keywordData.setPage(page);
        keywordData.setLimit(limit);
        keywordData.setList(list);
        return keywordData;
    }
}
